﻿using CMS.AOP;
using CMS.DataAccess;
using CMS.Model;

namespace CMS.ServiceProvider
{
    public class ScheduleTemplateServiceProvider : BaseServiceProvider<ScheduleTemplateModel>
    {
        public ScheduleTemplateServiceProvider()
        {
            this.udpInstance.RegBeforeSaveAction(new ScheduleTemplateConfictSaveAction());
            this.AddDefaultValueSetter(new ScheduleTemplateDefValueSetter());
        }
        public List<ScheduleTemplateModel> ListByClass(string dseClass)
        {
            return qryInstance.Where(CondCollection.True().Eq(nameof(ScheduleTemplateModel.DseClass), dseClass)).List();
        }
    }
}
